package com.itheima.stock.mapper;

import com.itheima.stock.domain.Stock4EvrDayDomain;
import com.itheima.stock.domain.Stock4MinuteDomain;
import com.itheima.stock.domain.StockDetailBySecondDomain;
import com.itheima.stock.domain.StockUpdownDomain;
import com.itheima.stock.pojo.StockRtInfo;
import com.itheima.stock.vo.res.R;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author X1769
* @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
* @createDate 2022-05-08 22:10:14
* @Entity com.itheima.stock.pojo.StockRtInfo
*/
@Mapper
public interface StockRtInfoMapper {

     int insertBatch(@Param("list") List<StockRtInfo> list);


    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);


    List<StockUpdownDomain> getStockUpdownAllInfos();

    List<Map> getUpdownCount(@Param("startTime") Date startTime, @Param("curTime")Date curTime,@Param("i") Integer integer);

    List<StockUpdownDomain> StockUpdownAll();

    List<Stock4MinuteDomain> getStock4MinuteDomain(@Param("code") Integer code,
                                                   @Param("startTime") Date startTime,
                                                   @Param("curTime")Date curTime);

    List<Map> getRangeCountByMinutes(@Param("date")Date date);

   List<Stock4EvrDayDomain> getStock4EvrDayDomain(@Param("tcurTime")Date tcurTime,
                                                @Param("pstartTime")Date pstartTime,
                                                @Param("code")String code);

    StockDetailBySecondDomain getStockDetailBySecondInfo(@Param("code")String code,
                                                         @Param("curDate")Date curDate);
}
